Skip to content

IDEX l1b Trigger origin, level, and mode fix#2828

Merged
lacoak21 merged 11 commits intoIMAP-Science-Operations-Center:devfrom
lacoak21:idex_l1b_trigger_mode_fix
Mar 10, 2026
Merged

IDEX l1b Trigger origin, level, and mode fix#2828
lacoak21 merged 11 commits intoIMAP-Science-Operations-Center:devfrom
lacoak21:idex_l1b_trigger_mode_fix

Conversation

@lacoak21
Copy link
Contributor

@lacoak21 lacoak21 commented Mar 10, 2026

Change Summary

closes #2658

Overview

Fix trigger mode, level, and origin at l1b. Update the rate calculation to use the correct delay.

File changes

Replace merged single trigger_mode/trigger_level outputs with per-gain-channel trigger mode/level variables in L1B and add a new trigger_origin variable.
Update L1A sample trigger-time calculation to pick the delay based on the trigger ID bits, and fix time-index generation (linspace → arange).
Update tests and external validation fixtures/mappings to align with new variable names and updated validation-file contents.

Testing

The validation file from Ethan contains different formatting and variables than we expect. The l1b validation code handles this but we should get a new one eventually.

@lacoak21 lacoak21 added this to the March 2026 milestone Mar 10, 2026
@lacoak21 lacoak21 requested review from Copilot and tech3371 March 10, 2026 15:55
@lacoak21 lacoak21 self-assigned this Mar 10, 2026
@lacoak21 lacoak21 added this to IMAP Mar 10, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes IDEX L1B trigger metadata handling to avoid merge conflicts and to better represent trigger configuration/origin per event, and updates L1A timing calculations to use the trigger-specific sample delay.

Changes:

  • Replace merged single trigger_mode/trigger_level outputs with per-gain-channel trigger mode/level variables in L1B and add a new trigger_origin variable.
  • Update L1A sample trigger-time calculation to pick the delay based on the trigger ID bits, and fix time-index generation (linspacearange).
  • Update tests and external validation fixtures/mappings to align with new variable names and updated validation-file contents.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
imap_processing/idex/idex_l1b.py Emits per-channel trigger mode/level variables, adds trigger-origin extraction, and wires these into the L1B dataset.
imap_processing/idex/idex_l1a.py Uses trigger ID to select the appropriate delay field when computing high-sample trigger time; updates time index construction.
imap_processing/cdf/config/imap_idex_l1b_variable_attrs.yaml Replaces single trigger attrs with per-channel attrs and adds attrs for trigger_origin.
imap_processing/tests/idex/test_idex_l1b.py Updates trigger-setting expectations and validation mappings; adjusts validation comparison logic for updated example file.
imap_processing/tests/idex/conftest.py Switches the L1B example validation file name/path used by tests.
imap_processing/tests/external_test_data_config.py Updates external test data download configuration for the renamed IDEX L1B validation file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

@tech3371 tech3371 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the code and code changes makes sense on high level. Thank you for testing though. It helps!

@lacoak21 lacoak21 merged commit 3d6feab into IMAP-Science-Operations-Center:dev Mar 10, 2026
14 checks passed
@github-project-automation github-project-automation bot moved this to Done in IMAP Mar 10, 2026
@lacoak21 lacoak21 deleted the idex_l1b_trigger_mode_fix branch March 10, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

IDEX l1b-sci-1week job failing

3 participants